import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
// import myWord_Can_be_no_same_name from '@/views/GoodBye'
const _import = require("@/router/import-" + process.env.NODE_ENV);

const routes = [
        {path: '/home', name: "home", component: _import("home")},
        {path: '/saleAnaly', name: 'saleAnaly', component: _import("saleAnaly"),children:[
                //销售统计
                {path: 'totalSale',name:'totalSale',component:_import('saleAnalyViews/totalSale'),meta:{url:'/get/totalSale'}},

                //各月前十热门车辆占总销量比例
                {path:'carSaleMonthTopTen',name:'carSaleMonthTopTen',component:_import('saleAnalyViews/carSaleMonthTopTen'),meta:{url:'/get/carSaleMonthTopTen'}},

                //价格统计
                // {path:'price',name:'price',component:_import('saleAnalyViews/price'),meta:{url:'/get/price'}},

                //品牌销量
                {path:'brandSale',name:'brandSale',component:_import('saleAnalyViews/brandSale'),meta:{url:'/get/brandSale'}},

                //车型销量走势
                {path:'carSaleTrend/:brand',name:'carSaleTrend',component:_import('saleAnalyViews/carSaleTrend'),meta:{url:'/get/carSaleTrend'},props:true},

                //SUV,MPV总销量占比
                {path:'suvAndMpvSales',name:'suvAndMpvSales',component:_import('saleAnalyViews/suvAndMpvSales'),meta:{url:'/get/suvAndMpvSales'}},

                //MPV各国系销量对比
                {path:'mpvNationalSale',name:'mpvNationalSale',component:_import('saleAnalyViews/mpvNationalSale'),meta:{url:'/get/mpvNationalSale'}},

                //各国系销量走势
                {path:'nationalCarSales/:national',name:'nationalCarSales',component:_import('saleAnalyViews/nationalCarSales'),meta:{url:'/get/nationalCarSales'},props:true},

                //各国系销量占比
                {path:'totalNationalSale',name:'totalNationalSale',component:_import('saleAnalyViews/totalNationalSale'),meta:{url:'/get/totalNationalSale'}},

                //SUV各国系销量对比
                {path:'suvNationalSale',name:'suvNationalSale',component:_import('saleAnalyViews/suvNationalSale'),meta:{url:'/get/suvNationalSale'}},
            ]},
        {path:'/recommendation',name:'recommendation', component: _import("recommendation")},
        {path:'/complaintsAnaly',name:'complaintsAnaly', component: _import('complaintsAnaly'),children:[
                        {path: 'brandComplaintType',name:'brandComplaintType' ,component: _import('complaintsAnaly/brandComplaintType')},
                        {path: 'complaintRanking',name:'complaintRanking' ,component: _import('complaintsAnaly/complaintRanking')},
                        {path: 'placeComplaint',name:'placeComplaint' ,component: _import('complaintsAnaly/placeComplaint')},
                ]},
        {path: '/systemMessage', name: 'systemMessage', component: _import("systemMessage"),children: [
                        {path:'scheduler',name:'scheduler',component: _import('systemMessage/scheduler')}
                ]},
        {path: '/bye/:id', name: 'gBye', component: _import("GoodBye"), props: true, meta: {isHello: true, isBye: false}},
        {path: '/login', name: 'login', component: _import("Login")},
        {path: '/sub123', name: 'sub', component: _import("Sub")},
        {path: '/main', name: 'main', component: _import("Main")},
    ]
;
const router = new Router({
    routes,
})
export default router
